<?php
class LatestHotshotsPortlet extends RightSidePortlet{
	
	public $title="Latest Hotshots";
	
	public $itemCount=2;
	
	public function init()
	{
		parent::init();
		$cs=Yii::app()->clientScript;
	}
	
	
	protected function renderContent()
	{
		$model=CoffeeShop::model();
		$cafes=$model->showWeb()->latest()->findAll(array('limit'=>$this->itemCount));//->hotshot()
		foreach($cafes as $cafe){
			$this->render('latestHotshotsPortletItem',array('model'=>$cafe));
		}
	}
}